package com.hns.dev.linys.guava.string;

import com.google.common.base.CaseFormat;

/**
 * Created by admin on 2019/2/16.
 * CaseFormat是一种实用工具类，以提供不同的ASCII字符格式之间的转换。
 */
public class GuavaCaseFormat {

    public static void main(String args[]){
        GuavaCaseFormat tester = new GuavaCaseFormat();
        tester.testCaseFormat();
    }

    private void testCaseFormat(){
        String data = "test_data";
        System.out.println(CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, "TEST-daTa"));
        System.out.println(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, "teSt_daTa"));
        System.out.println(CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, "tEst_daTa"));
    }

}
